﻿using ServiceCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public class warehouse_base
    {
        /// <summary>
        /// id
        /// </summary>
        public string base_id { get; set; }
        /// <summary>
        /// 基础名称
        /// </summary>
        public string base_name { get; set; }
        /// <summary>
        /// 仓库数据类型
        /// </summary>
        public warehouse_data_type warehouse_data_type { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime addtime { get; set; }
        /// <summary>
        /// 所属上级 只有区域该属性才有对应关系 如果为主库数据 则为"0"
        /// </summary>
        public string parent_id { get; set; }
        /// <summary>
        /// 添加用户
        /// </summary>
        public string adduser { get; set; }
        /// <summary>
        /// 仓库启用状态
        /// </summary>
        public warehouse_base_state warehouse_base_state { get; set; }
    }
    /// <summary>
    /// 仓库数据类型
    /// </summary>
    public enum warehouse_data_type
    {
        仓库 = 1,
        区域 = 2
    }
    public enum warehouse_base_state
    {
        启用 = 1,
        禁用 = 2
    }
    /// <summary>
    /// 库位表
    /// </summary>
    public class warehouse_position
    {
        /// <summary>
        /// 库位ID
        /// </summary>
        public string warehouse_position_id { get; set; }
        /// <summary>
        /// 仓库ID
        /// </summary>
        public string warehouse_id { get; set; }
        /// <summary>
        /// 区域ID
        /// </summary>
        public string warehouse_area_id { get; set; }
        /// <summary>
        /// 库位类型
        /// </summary>
        public warehouse_position_type warehouse_position_type { get; set; }
        /// <summary>
        /// 类型编号 堆货托盘=T 货架=H 
        /// </summary>
        public string type_No { get; set; }
        /// <summary>
        /// 字母
        /// </summary>
        public string letter_type_No { get; set; }
        /// <summary>
        /// 自定义
        /// </summary>
        public string custom_type_No { get; set; }
        /// <summary>
        /// 完整类型编号= 类型编号 - 字母 - 自定义
        /// </summary>
        public string complete_type_No { get; set; }
        /// <summary>
        /// 设置物料编号
        /// </summary>
        public string materiel_id { get; set; }
        /// <summary>
        /// 添加人
        /// </summary>
        public string adduser { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime addtime { get; set; }
        /// <summary>
        ///  状态
        /// </summary>
        public warehouse_position_state warehouse_position_state { get; set; }
    }

    public enum warehouse_position_type
    {
        堆货托盘 = 1,
        货架 = 2
    }

    public enum warehouse_position_state
    {
        启用 = 1,
        禁用 = 2
    }


    public class save_warehouse_position_params
    {
        /// <summary>
        /// 库位ID
        /// </summary>
        public string warehouse_position_id { get; set; }
        /// <summary>
        /// 仓库ID
        /// </summary>
        public string warehouse_id { get; set; }
        /// <summary>
        /// 区域ID
        /// </summary>
        public string warehouse_area_id { get; set; }
        /// <summary>
        /// 库位类型
        /// </summary>
        public warehouse_position_type? warehouse_position_type { get; set; }
        /// <summary>
        /// 字母
        /// </summary>
        public string letter_type_No { get; set; }
        /// <summary>
        /// 自定义
        /// </summary>
        public string custom_type_No { get; set; }
    }


    public class search_warehouse_position_item : warehouse_position
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public string materiel_name { get; set; }
        /// <summary>
        /// 物料编号
        /// </summary>
        public string materiel_total_show_no { get; set; }

        public string specifications { get; set; }

        public string materiel_pic { get; set; }

        public string unit { get; set; }

        public string use_des { get; set; }

        public string warehouse_name { get; set; }

        public string warehouse_area_name { get; set; }

        public string warehouse_position_type_str { get { return warehouse_position_type.ToString(); } }
    }
    /// <summary>
    /// 
    /// </summary>
    public class search_warehouse_position_params : Base_List_Params
    {
        /// <summary>
        /// 仓库库位
        /// </summary>
        public string warehouse_id { get; set; }
        /// <summary>
        /// 区域ID
        /// </summary>
        public string warehouse_area_id { get; set; }
        /// <summary>
        /// 库位
        /// </summary>
        public string complete_type_No { get; set; }
        /// <summary>
        /// 搜索类型
        /// </summary>
        public warehouse_position_searchtype? search_type { get; set; }

        public string search_value { get; set; }

        public string specifications { get; set; }
    }
    public enum warehouse_position_searchtype
    {
        物料编号 = 1,
        物料名称 = 2
    }
}
